import request from '@/utils/request'

const url = 'http://192.168.10.100:9881/rabc'

export function fetchList(query) {
  console.log('fetch')
  return request({
    url: url + '/user/getAll',
    method: 'get',
    params: query
  })
}

export function addUser(data) {
  console.log('add user')
  return request({
    url: url + '/user/addUser',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  console.log('add user')
  return request({
    url: url + '/user/updateUser',
    method: 'post',
    data
  })
}

export function deleteUserById(id) {
  console.log('add user')
  return request({
    url: url + '/user/deleteUser',
    method: 'get',
    params: id
  })
}

